using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Feature Vertices To Points</para>
    /// <para>Creates a feature class containing points generated from specified vertices or locations of the input features.</para>
    /// <para>创建一个要素类，其中包含从输入要素的指定折点或位置生成的点。</para>
    /// </summary>    
    [DisplayName("Feature Vertices To Points")]
    public class FeatureVerticesToPoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FeatureVerticesToPoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features that can be line or polygon.</para>
        /// <para>输入要素可以是直线或面。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output point feature class.</para>
        /// <para>输出点要素类。</para>
        /// </param>
        public FeatureVerticesToPoints(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Feature Vertices To Points";

        public override string CallName => "management.FeatureVerticesToPoints";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _point_location.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features that can be line or polygon.</para>
        /// <para>输入要素可以是直线或面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output point feature class.</para>
        /// <para>输出点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Point Type</para>
        /// <para><xdoc>
        ///   <para>Specifies where an output point will be created.</para>
        ///   <bulletList>
        ///     <bullet_item>All vertices—A point will be created at each input feature vertex. This is the default.</bullet_item><para/>
        ///     <bullet_item>Midpoint—A point will be created at the midpoint, not necessarily a vertex, of each input line or polygon boundary.</bullet_item><para/>
        ///     <bullet_item>Start vertex—A point will be created at the start point (first vertex) of each input feature.</bullet_item><para/>
        ///     <bullet_item>End vertex—A point will be created at the end point (last vertex) of each input feature.</bullet_item><para/>
        ///     <bullet_item>Both start and end vertex—Two points will be created, one at the start point and another at the endpoint of each input feature.</bullet_item><para/>
        ///     <bullet_item>Dangling vertex—A dangle point will be created for any start or end point of an input line, if that point is not connected to another line at any location along that line. This option does not apply to polygon input.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在何处创建输出点。</para>
        ///   <bulletList>
        ///     <bullet_item>所有折点—将在每个输入要素折点处创建一个点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>中点 - 将在每条输入线或面边界的中点（不一定是折点）处创建一个点。</bullet_item><para/>
        ///     <bullet_item>起始折点—将在每个输入要素的起点（第一个折点）处创建一个点。</bullet_item><para/>
        ///     <bullet_item>终点 - 将在每个输入要素的终点（最后一个折点）处创建一个点。</bullet_item><para/>
        ///     <bullet_item>起点和终点折点—将创建两个点，一个位于每个输入要素的起点，另一个位于终点。</bullet_item><para/>
        ///     <bullet_item>悬空顶点 - 如果输入线的任何起点或终点未连接到该线上任何位置的另一条线，则将为该点创建悬空点。此选项不适用于面输入。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _point_location_value _point_location { get; set; } = _point_location_value._ALL;

        public enum _point_location_value
        {
            /// <summary>
            /// <para>All vertices</para>
            /// <para>All vertices—A point will be created at each input feature vertex. This is the default.</para>
            /// <para>所有折点—将在每个输入要素折点处创建一个点。这是默认设置。</para>
            /// </summary>
            [Description("All vertices")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>Midpoint</para>
            /// <para>Midpoint—A point will be created at the midpoint, not necessarily a vertex, of each input line or polygon boundary.</para>
            /// <para>中点 - 将在每条输入线或面边界的中点（不一定是折点）处创建一个点。</para>
            /// </summary>
            [Description("Midpoint")]
            [GPEnumValue("MID")]
            _MID,

            /// <summary>
            /// <para>Start vertex</para>
            /// <para>Start vertex—A point will be created at the start point (first vertex) of each input feature.</para>
            /// <para>起始折点—将在每个输入要素的起点（第一个折点）处创建一个点。</para>
            /// </summary>
            [Description("Start vertex")]
            [GPEnumValue("START")]
            _START,

            /// <summary>
            /// <para>End vertex</para>
            /// <para>End vertex—A point will be created at the end point (last vertex) of each input feature.</para>
            /// <para>终点 - 将在每个输入要素的终点（最后一个折点）处创建一个点。</para>
            /// </summary>
            [Description("End vertex")]
            [GPEnumValue("END")]
            _END,

            /// <summary>
            /// <para>Both start and end vertex</para>
            /// <para>Both start and end vertex—Two points will be created, one at the start point and another at the endpoint of each input feature.</para>
            /// <para>起点和终点折点—将创建两个点，一个位于每个输入要素的起点，另一个位于终点。</para>
            /// </summary>
            [Description("Both start and end vertex")]
            [GPEnumValue("BOTH_ENDS")]
            _BOTH_ENDS,

            /// <summary>
            /// <para>Dangling vertex</para>
            /// <para>Dangling vertex—A dangle point will be created for any start or end point of an input line, if that point is not connected to another line at any location along that line. This option does not apply to polygon input.</para>
            /// <para>悬空顶点 - 如果输入线的任何起点或终点未连接到该线上任何位置的另一条线，则将为该点创建悬空点。此选项不适用于面输入。</para>
            /// </summary>
            [Description("Dangling vertex")]
            [GPEnumValue("DANGLE")]
            _DANGLE,

        }

        public FeatureVerticesToPoints SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}